<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta name="Generator" content="68ECSHOP v4_2" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="Keywords" content="" />
    <meta name="Description" content="" />
    <title>收货地址 - 淘嘟嘟网</title>
    <link rel="stylesheet" type="text/css" href="__CSS__/home/68ecshop_common.css"/>
    <link rel="stylesheet" type="text/css" href="__CSS__/home/user.css"/>
    <script src="__JS__/jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="__JS__/home/common.min.js" type="text/javascript" charset="utf-8"></script>
<!--    <script src="__JS__/home/jquery.validate.min.js" type="text/javascript" charset="utf-8"></script>-->
<!--    <script src="__JS__/home/jq_validate.js" type="text/javascript" charset="utf-8"></script>-->
    <!--			layer-->
    <script type="text/javascript" src="__JS__/jquery.form.js"></script>
    <script type="text/javascript" src="__JS__/tips/toastr.min.js"></script>
    <script type="text/javascript" src="__JS__/layer/layer.js"></script>
    <script type="text/javascript" src="__JS__/jquery.layer.js"></script>
    <!--			layer-->
    <script type="text/javascript" src="__JS__/taodudu.lib.js"></script>
</head>
<body>
<!--头部导航-->
<include file="Public/head_a"/>
<include file="Public/head_b"/>
<include file="Public/head_c"/>

<div class="margin-w1210 clearfix">
    <!--S用户中心公共左边-->
    <include file="Public/user_left"/>
    <!--E用户中心公共左边-->
    <div class="user-right">
        <div class="box" style="margin-left: 10px; width: 989px;">
            <div class="alert alert-success" style="margin-top: 0;">
                <h4>操作提示：</h4>
                <ul>
                    <li>您可对已有的地址进行编辑及删除，亦可新增收货地址</li>
                </ul>
            </div>
            <div class="mar_top">
                <!--  遍历出的已经添加储存过的地址  -->
                <if condition="$address">
                    <foreach name="address" item="v">
                        <form action="{:U('Address/modifying',array('address_id'=>$v['address_id']))}" method="post" name="theForm" id="myform_{$v['address_id']}" class="myform" onsubmit="return validata($(this))">
                            <table width="100%" border="0" cellpadding="10" cellspacing="1" bgcolor="#eeeeee">
                                <tbody>
                                <tr>
                                    <td align="right" width="10%">配送区域：</td>
                                    <td colspan="3" align="left">
                                        <select class="form-control width-auto" name="province_id" id="province_id" data-current="{$v['province_id']}">
                                            <option value>请选择省份</option>
                                        </select>
                                        <select class="form-control width-auto" name="city_id" id="city_id" data-current="{$v['city_id']}">
                                            <option value>请选择城市</option>
                                        </select>
                                        <select class="form-control width-auto" name="area_id" id="area_id" data-current="{$v['area_id']}">
                                            <option value>请选择区县</option>
                                        </select>
                                    </td>

                                </tr>
                                <tr>
                                    <td align="right" width="10%">收货人姓名：</td>
                                    <td align="left" width="40%"><input name="true_name" type="text" class="inputBg" id="consignee_1" value="{$v['true_name']}"> (必填) </td>
                                    <td align="right" width="10%">Email：</td>
                                    <td align="left" width="40%"><input name="tel_email" type="text" class="inputBg" id="email_1" value="{$v['tel_email']}">
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">详细地址：</td>
                                    <td align="left" colspan="3"><input name="address" type="text" class="inputBg" id="address_1" value="{$v['address']}" style="width: 692px;"> (必填)
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">固定电话：</td>
                                    <td align="left"><input name="landline" type="text" class="inputBg" id="tel_1" value="{$v['landline']}" placeholder="区号-电话号码-分机号"></td>
                                    <td align="right">手机：</td>
                                    <td align="left"><input name="mob_phone" type="text" class="inputBg" id="mobile_1" value="{$v['mob_phone']}">
                                    </td>
                                </tr>
                                <tr>

                                    <td align="right">邮政编码：</td>
                                    <td align="left"><input name="zip_code" type="text" class="inputBg" id="zipcode_1" value="{$v['zip_code']}"></td>
                                    <td align="right">设为默认：</td>
                                    <td align="left">
                                        <if condition="($v.is_default eq 1)">
                                            <input name="is_default" type="checkbox" class="" id="best_time_1" checked='checked' value="1">
                                        <else/>
                                            <input name="is_default" type="checkbox" class="" id="best_time_1" value="1">
                                        </if>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4" align="center">
                                        <input type="submit" class="main-btn main-btn-large" value="确认修改">
                                        <a class="main-btn main-btn-large" address_id="{$v['address_id']}" onclick="del($(this).attr('address_id'))">删除</a>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </form>
                        <div class="blank10"></div>
                        <script>
                            a = '#myform_'+"{$v['address_id']}";
                            $(a).layer({});
                        </script>
                    </foreach>
                </if>

                <form action="{:U('Address/index')}" method="post" name="theForm" id="myform_a" class="myform" onsubmit="return validata($(this))">
                    <table width="100%" border="0" cellpadding="10" cellspacing="1" bgcolor="#eeeeee">
                        <tbody>
                        <tr>
                            <td align="right" width="10%">配送区域：</td>
                            <td colspan="3" align="left">
                                <select class="form-control width-auto" name="province_id" id="province_id" data-current="">
                                    <option value>请选择省份</option>
                                </select>
                                <select class="form-control width-auto" name="city_id" id="city_id" data-current="">
                                    <option value>请选择城市</option>
                                </select>
                                <select class="form-control width-auto" name="area_id" id="area_id" data-current="">
                                    <option value>请选择区县</option>
                                </select>
                            </td>

                        </tr>
                        <tr>
                            <td align="right" width="10%">收货人姓名：</td>
                            <td align="left" width="40%"><input name="true_name" type="text" class="inputBg" id="consignee_1" value=""> (必填) </td>
                            <td align="right" width="10%">Email：</td>
                            <td align="left" width="40%"><input name="tel_email" type="text" class="inputBg" id="email_1" value="">
                            </td>
                        </tr>
                        <tr>
                            <td align="right">详细地址：</td>
                            <td align="left" colspan="3"><input name="address" type="text" class="inputBg" id="address_1" value="" style="width: 692px;"> (必填)
                            </td>
                        </tr>
                        <tr>
                            <td align="right">固定电话：</td>
                            <td align="left"><input name="landline" type="text" class="inputBg" id="tel_1" value="" placeholder="区号-电话号码-分机号"></td>
                            <td align="right">手机：</td>
                            <td align="left"><input name="mob_phone" type="text" class="inputBg" id="mobile_1" value="">
                            </td>
                        </tr>
                        <tr>

                            <td align="right">邮政编码：</td>
                            <td align="left"><input name="zip_code" type="text" class="inputBg" id="zipcode_1" value=""></td>
                            <td align="right">设为默认：</td>
                            <td align="left"><input name="is_default" type="checkbox" class="" id="best_time_1" value="1"></td>
                        </tr>
                        <tr>
                            <td colspan="4" align="center">
                                <input type="submit" class="main-btn main-btn-large" value="新增收货地址">
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </form>
                <div class="blank10"></div>
            </div>
        </div>
    </div>
</div>
<div class="pop-mask"></div>
<!--S公共尾部-->
<div style="clear: both"></div>
<div class="site-footer">
    <div class="footer-related">
        <include file="Public/bootom_a" />
        <include file="Public/bootom_b" />
        <include file="Public/bootom_c" />
    </div>
</div>>
<a href="#" class="big-link" data-reveal-id="myModal" data-animation="fade"></a>
</body>

</html>

<!--F 省市区三级联动-->
<script src="__JS__/area.data.js"></script>
<script src="__JS__/jquery.region.js"></script>
<script type="text/javascript">
    $(".myform").region();
</script>
<!--E 省市区三级联动-->
<!--F layer-->
<script>
    $('#myform_a').layer({});
</script>
<!--F layer-->
<script>
    function del(a){
        layer.msg('扔掉此地址', {
            time: 10000,
            btn: ['不要了', '考虑考虑']
        },function(){
            data = {address_id:a};
            p = Aajax(homeUrl+"/Address/del",data);
            if(p){
                layer.msg("已扔掉");
                history.go(0);
            }else{
                layer.msg("出错了，要不你就留着吧");
            }
        });
    }
</script>